package com.example.mydemo2;

import android.os.Parcel;
import android.os.Parcelable;


public class
BusinessItem implements Parcelable {
    private int businessImage;
    private String tvBusinessNick;
    private String tvBusinessDistance;
    private String tvBusinessState;

    public int getBusinessImage() {
        return businessImage;
    }

    public void setBusinessImage(int businessImage) {
        this.businessImage = businessImage;
    }

    public String getTvBusinessNick() {
        return tvBusinessNick;
    }

    public void setTvBusinessNick(String tvBusinessNick) {
        this.tvBusinessNick = tvBusinessNick;
    }

    public String getTvBusinessDistance() {
        return tvBusinessDistance;
    }

    public void setTvBusinessDistance(String tvBusinessDistance) {
        this.tvBusinessDistance = tvBusinessDistance;
    }

    public String getTvBusinessState() {
        return tvBusinessState;
    }

    public void setTvBusinessState(String tvBusinessState) {
        this.tvBusinessState = tvBusinessState;
    }

    public static Creator<BusinessItem> getCREATOR() {
        return CREATOR;
    }

    public BusinessItem(int businessImage, String tvBusinessNick, String tvBusinessDistance, String tvBusinessState) {
        this.businessImage = businessImage;
        this.tvBusinessNick = tvBusinessNick;
        this.tvBusinessDistance = tvBusinessDistance;
        this.tvBusinessState = tvBusinessState;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.businessImage);
        dest.writeString(this.tvBusinessNick);
        dest.writeString(this.tvBusinessDistance);
        dest.writeString(this.tvBusinessState);
    }

    public void readFromParcel(Parcel source) {
        this.businessImage = source.readInt();
        this.tvBusinessNick = source.readString();
        this.tvBusinessDistance = source.readString();
        this.tvBusinessState = source.readString();
    }

    public BusinessItem() {
    }

    protected BusinessItem(Parcel in) {
        this.businessImage = in.readInt();
        this.tvBusinessNick = in.readString();
        this.tvBusinessDistance = in.readString();
        this.tvBusinessState = in.readString();
    }

    public static final Creator<BusinessItem> CREATOR = new Creator<BusinessItem>() {
        @Override
        public BusinessItem createFromParcel(Parcel source) {
            return new BusinessItem(source);
        }

        @Override
        public BusinessItem[] newArray(int size) {
            return new BusinessItem[size];
        }
    };

}
